
export enum USER_PROFILE_STATUS {
    unknown = 'unknown',
    pending = 'pending',
    enable = 'enable',
    disable = 'disable',
    loading='loading'
}
const OrderStatus = Object.freeze({
    PENDING: 0,
    ACCEPTED: 1,
    COMPLETED: 2,
    REJECTED: -1
  });
  export interface DataItem {
    value: string;
    label: string;
    children?: DataItem[];
  }
  export interface IRegionDataPromie{
    codeToTextT:{ [key: string]: string };
    regionDataT:DataItem[]

  }
 export const OrderStatusLabel = Object.freeze({
    [OrderStatus.PENDING]: '待接单',
    [OrderStatus.ACCEPTED]: '已接单',
    [OrderStatus.COMPLETED]: '已完成',
    [OrderStatus.REJECTED]: '已取消'
  });

export interface IResponseSuccess<T> {
    /** 请求的状态码 */
    statusCode: number;
    /** 返回的数据 */
    data: T;
    /** 返回的原始数据 */
    header: Record<string, string>;
    /** 请求的完整信息 */
    cookies?: string[];
    errMsg: string;
    accelerateType: string
}
export interface ICommonResponse {
    code: number; // 返回的状态码
    msg: string;  // 返回的消息
    time: number; // 时间戳
}
//登录接口
export interface IShopUserLoginUserInfo{
    id:number;
    username:string;
    nickname:string;   
    avatar:string;
    mobile:string;
    token:string;
    status:string;
}
export interface IShopUserLogin extends ICommonResponse {
    data:{
        userInfo:IShopUserLoginUserInfo
    }
}




//绑定手机号码

export interface IBindPhone extends ICommonResponse{
  
    data: {
        type?: string;
        mobile?: string;
    }
   
}
export interface IBindPhonePromise {
    code: number;
    mobile: string;
    msg: string;

}
//获取聊天收费信息(废弃)
export interface ILowestCharge {
    charge: number;
    duration: number;
}

//查询入驻信息审核状态

export interface IShopUserProfileStatus extends ICommonResponse {
    data: {
        status: keyof typeof USER_PROFILE_STATUS; // 用户状态，例如 "disable"
        remark?: string; // 备注信息，例如 "审核不通过测试"
        subscribe?: number; // 订阅状态，例如 "subscribe"
        subscribe_qr_code?:string;
        prompt_message?:string;
        is_take_orders?:number
    };
}
//获取入驻信息
export interface IUserProfileInfoTopic {
    id: number;
    sort: number;
    title: string;
}
export interface IUserProfileInfoJobType {
    id: number;
    job_type_id: number;
    name: string;
}
export interface IUserProfileInfoEditStatus {
    avatar: string;
    chat_duration: string;
    chat_price: string;
    city_code: string;
    district_code: string;
    gender: string;
    id: string;
    introduction: string;
    media_img: string;
    media_video: string;
    nickname: string;
    province_code: string;
    readme: string;
    topic: string;

}
export interface IUserProfileInfoData {
    avatar: string;
    chat_duration: number;
    chat_price: string;
    city_code: number;
    district_code: number;
    gender: number;
    id: number;
    introduction: string;
    media_img: Array<string>;
    media_video: string;
    nickname: string;
    province_code: number;
    readme: string;
    status: keyof typeof USER_PROFILE_STATUS; // 用户状态，例如 "disable"
    topic: Array<IUserProfileInfoTopic>;
    job_type: Array<IUserProfileInfoJobType>;
    modify_field: IUserProfileInfoEditStatus
    service_type: Array<IShopServiceTypeData>
}
export interface IUserProfileInfo extends ICommonResponse{
   
    data: IUserProfileInfoData
}
//删除入驻的话题

export interface IUserProfileTopicDel extends ICommonResponse {
 
    data: any
}
//获取职业分类列表
export interface IChannelCategoriesItemJobType {
    channel_categories_id: number;
    id: number;
    name: string;

}
export interface IChannelCategoriesItem {
    id: number;
    name: string;
    jobType: Array<IChannelCategoriesItemJobType>
}
export interface IChannelCategories extends ICommonResponse{
  
    data: Array<IChannelCategoriesItem>
}


//编辑单项入驻信息
export interface IUserProfileSingleEdit extends ICommonResponse{
    
    data: any
}

//用户设置
export interface IUserSettingData{
    privacy_agreement: string;
        mobile: string;
        service_agreement: string;
        index_bg: string;
}
export interface IUserSetting extends ICommonResponse{
    
    data: IUserSettingData
   
}
export interface IUserSettingPromise {
    code: number;
    msg: string;
    privacy_agreement: string;
    mobile: string;
    service_agreement: string;
    index_bg:string


}

//切换订单是否开启
export interface IShopUserProfileSwitchOrderData {
    is_take_orders:number;
    status:string
}
export interface IShopUserProfileSwitchOrder extends ICommonResponse {
    data:IShopUserProfileSwitchOrderData
}


//获取服务分类列表
export interface IUserProfileEditPromise {
    code: number; // 返回的状态码
    msg: string;  // 返回的消息
    data:any
}
export interface IShopServiceTypeData{
  name: string;
  content: string;
  id:number;
  service_type_id:number;
}
export interface IShopServiceType extends ICommonResponse{
    data:Array<IShopServiceTypeData>
}

//订单列表
export interface IOrderDetailData{
    id:number;
    order_sn:number;
    user_id:number;
    shop_user_id:number;
    topic_id:number;
    remark:string;
    status:number;
    accept_time:number;
    complete_time:number;
    create_time:number;
    nickname:string;
    avatar:string;
    cancel_time:number;
    
    shop_user:{
        id:number;
        nickname:string;
        avatar:string;
        introduction:string;
        is_take_orders:string
    };
    topic:{
        id:number;
        title:string;
    };
    accept_expire_time:number;
    accept_start_time:number;
    accept_end_time:number;
    complete_expire_time:number;
    cancel_reason:string;
    in_progress:string;
    accept_text:string;
    call_time_text:string;
    mobile:string;
    wechat:string
}
export interface IOrderListResponse extends ICommonResponse{
    data:{
        current_page:number;
        total:number;
        last_page:number;
        per_page:number;
        data:Array<IOrderDetailData>
    }
   
}
export interface IOrderAcceptResponse extends ICommonResponse{
    data:null
}

export interface IOrderRejectResponse extends ICommonResponse{
    data:null
}

export interface IOrderCompleteResponse extends ICommonResponse{
    data:null
}


export interface IOrderDetailResponse extends ICommonResponse{
    data:IOrderDetailData
}
export interface IRegion{
    code:number;
    name:string;
}
export interface IRegionDataChildren extends IRegion{
    
    children:Array<IRegion>

}
export interface IRegionData extends IRegion{
    children:Array<IRegion>

}
export interface IRegionResponse extends ICommonResponse{
    data:Array<IRegionData>
}


export interface IPrivacyResponse extends ICommonResponse{
    data:{
        content:Array<any>
    }
}

export  interface ISubscribeMessagePromise {
    content: string,
    status: boolean
}